<template>
	<view>
		<u-cell-group v-for="item in list" :key="item.id">
		    <u-cell
		        :title="item.content" :label="item.createtime"
		        center
		    ></u-cell>
		</u-cell-group>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				LoginUser: uni.getStorageSync('LoginUser'),
				list: []
			}
		},
		onShow(){
			this.recordList()
		},
		methods:{
			async recordList(){
				let data ={
					status: 'uniapp',
					userid: this.LoginUser.id
				}
				
				let result = await this.$u.api.user.userrecord(data)
				if(result.code == '1'){
					this.list = result.data
				} else {
					this.$refs.uToast.show({
						type:'error',
						message: result.msg
					})
										
					return false
				}
			}
		}
	}
</script>
